Skip to content

Prevent unexpected native controller output hanging the process#56491

Merged
droberts195 merged 1 commit intoelastic:masterfrom
droberts195:inherit_stderr_stdout_on_controller_spawn
May 13, 2020
Merged

Prevent unexpected native controller output hanging the process#56491
droberts195 merged 1 commit intoelastic:masterfrom
droberts195:inherit_stderr_stdout_on_controller_spawn

Conversation

@droberts195
Copy link
Copy Markdown

In normal operation native controllers are not expected to write
anything to stdout or stderr. However, if due to an error or
something unexpected with the environment a native controller
does write something to stdout or stderr then it will block if
nothing is reading that output. (On Linux both glibc and ld.so.1
can write errors to stderr in certain situations.)

This change makes the stdout and stderr of native controllers
reuse the same stdout and stderr as the Elasticsearch JVM (which
are by default redirected to es.stdout.log and es.stderr.log) so
that if something unexpected is written to native controller
output then:

  1. The native controller process does not block, waiting for
    something to read the output
  2. We can see what the output was, making it easier to debug
    obscure environmental problems

Relates #56366

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team v7.7.1 v7.8.0 v7.9.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants